package com.zeji.androidadvance.activity.littleAd;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.zeji.androidadvance.R;
import com.zeji.androidadvance.utils.CommonUtil;

import java.util.Arrays;

@SuppressLint("NonConstantResourceId")
public class LittleAdActivity extends AppCompatActivity {
    @BindView(R.id.littleAdView)
    LittleAdView littleAdView;
    @BindView(R.id.littleAdTv)
    TextView tvClickMe;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_little_ad);
        ButterKnife.bind(this);
        littleAdView.setValues(Arrays.asList("测试1", "测试2", "测试3", "测试4"));
        littleAdView.start();

        tvClickMe.setOnClickListener(v -> CommonUtil.log("单击了"));
        tvClickMe.setOnLongClickListener(v -> {
            CommonUtil.log("长按了");
            return false;
        });
    }
}